package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * @ClassName FunctionTypeEnum
 * @Description: 功能区类型
 * @Author ck
 * @Date 2021/12/13
 * @Version V1.0
 **/
@Getter
public enum FunctionTypeEnum {
    USER_AGREEMNET(1, "用户协议"),
    PRIVACY_AGREEMNET(2, "隐私协议"),
    SAFETY_TIPS(3, "安全提示"),
    USE_GUIDE(4, "使用指南"),
    ABOUT_US(5, "关于我们"),
    COOPERATIVE_ALLIANCE(6, "合作加盟"),
    CONTACT_CUSTOMER(7, "联系客服"),
    JZ_HN(8, "兼职红娘"),
    PT_HN(9, "红娘"),
    TP_HN(10, "铜牌红娘"),
    YP_HN(11, "银牌红娘"),
    JP_HN(12, "金牌红娘"),
    LOVE_TUTOR(13, "爱情导师"),
    HZ_SZ(14, "红娘守则"),
    VIP_TQ(15, "vip特权"),
    TX_GZ(16, "提现规则"),
    FX_GZ(17, "分享规则"),
    BUY_XY(18, "购买协议"),
    JOIN_XY(19, "入驻协议"),
    MAKEFRIEND_XY(20, "交友规则"),
    QUANLI_DESC(21, "权利说明");

    private int code;

    private String desc;

    FunctionTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static FunctionTypeEnum getDscByType(Integer type) {
        for (FunctionTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
